
{{ define "main" }}

<div ref="streamContainer" class="stream-container">
    <div class="post-list-container post-list-container-no-background">
        {{range .Paginator.Pages}}
            {{if and (.IsPage) (.Params.date)}}
            <a href="{{.Permalink}}" class="a-block">
                <div class="post-item-wrapper">
                    <div class="post-item post-item-no-divider">
                        <div class="post-item-info-wrapper">
                            <div class="post-item-title">
                                {{.Title}}
                            </div>
                            <div class="post-item-summary">
                                {{.Description}}
                            </div>
                            {{ partial "post-item-meta.html" . }}
                        </div>
                        {{ $featured_image := .Params.featured_image }}
                        {{ if $featured_image }}
                            {{ $image := .Resources.GetMatch (.Params.featured_image) }}
                            <div class="post-item-image-wrapper">
                            <div class="post-item-image"
                            {{ if $image }}
                                 style="background-image: url('{{ $image.Permalink }}')"
                            {{ else }}
                                 style="background-image: url('{{ $featured_image | absURL}}')"
                            {{ end }}
                            ></div>
                            </div>
                        {{ end }}
                    </div>
                </div>
            {{ end }}
        {{ end }}
        </a>
    </div>
</div>
{{ end }}
